package com.zoweunion.mechanic.dao.base;

import java.util.List;
import java.util.Map;

import com.zoweunion.mechanic.entity.ThingsIdCarRecordBean;
import com.zoweunion.mechanic.model.app.ApplicationUnlock;
import com.zoweunion.mechanic.model.app.LockCar;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
public interface LockCarMapper {

    List<Map<String, Object>> getLockVehicleList(Map<String, Object> reqMap);

    List<Map<String, Object>> getApplicationUnlockList(@Param("lockCarId") String lockCarId);

    int saveLockCar(LockCar lockCar);

    int saveUnLockCar(LockCar lockCar);

    int updateLockTime(LockCar lockCar);

    LockCar getLockCarByCarId(@Param("carId") String carId);

    int updateCarIsLoeckByCarId(@Param("id") String id, @Param("isLocked") String isLocked);

    int updateCarIsLoeckByThingsId(String thingsId, String isLocked);

    int insertAppleLock(Map<String, Object> reqMap);

    List<ApplicationUnlock> getApplicationUnlock(@Param("carId") String carId, @Param("lockCarId") String lockCarId);

    List<Map<String, Object>> getCarThingsByCarid(@Param("carId") String carId);


    void updateIsRead(Map<String, Object> reqMap);


    int setReaded(@Param("carId") String carId);

    int insertLockMessage(Map<String, Object> reqMap);

    Map<String, Object> getSmsSendTotalByPhone(@Param("mobilePhone") String mobilePhone);

    int updateSendTotalByPhone(@Param("mobilePhone") String mobilePhone);

    int initSendRecordNumber(@Param("mobilePhone") String mobilePhone);

    String getHasLockCar(@Param("carId") String carId);

    void thingsIdCarOperation(Map<String, Object> reqMap);

    Integer updateThingsIdCarOperationStatusTo2(Map<String, Object> reqMap);

    void thingsIdCarLockCycleOperation(Map<String, Object> reqMap);

    void updateThingsIdCarOperation(Map<String, Object> reqMap);

    Integer getThingsIdCarOperation(Map<String, Object> reqMap);

    List<Map<String, Object>> getLockCarThingsByCarId(String car_id);

    List<Map<String, Object>> thingsIdCarRecord(Map<String, Object> reqMap);

    Map<String, Object> thingsIdCarRecordNew(Map<String, Object> reqMap);

    void updateMessageError(@Param("thingsId")String thingsId);

    List<Map<String, Object>> bluetoothUnLock(@Param("reqMap")Map<String, Object> reqMap);

    void updateStatus(@Param("thingsId")String thingsId);

    List<ThingsIdCarRecordBean> exportThingsIdCarRecord(Map<String, Object> reqMap);

    /**
     * 获取周期解锁的列表
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getCycleLockThingsIdList(Map<String, Object> reqMap);

    /**
     * 更新周期锁车的信息的执行状态
     * @param reqMap
     * @return
     */
    int updateCycleLockThingsStatus(Map<String, Object> reqMap);

    /**
     * 更新周期锁车的车辆设备的锁车状态
     * @param reqMap
     * @return
     */
    int updateCarStatusForCycleLock(Map<String, Object> reqMap);

    /**
     * 更新周期锁车的信息的执行状态 - 用于APP解锁页面
     * @param reqMap
     * @return
     */
    int updateCycleLockThingsStatusForUnlock(Map<String, Object> reqMap);

    int changeMonitorState(Map<String, Object> reqMap);

    int updateThingsIdCarOperationForCMS(Map<String, Object> reqMap);

    List<Map<String, Object>> selectUserBySid(String s_id);

    List<Map<String, Object>> selectJrUserBySid(String s_id);
}
